#ifndef _FAT32_H_
#define _FAT32_H_

#include "types.h"


#pragma pack(1)
typedef struct
{
	u8 fname[12];
	u8 attr;
	u32 cluster;
	u32 size;
}TFileInfo;
#pragma pack()

bool fat32_init();

void fat32_findFirst(TFileInfo *dir);
bool fat32_findNext(TFileInfo *dir);

bool fat32_open(TFileInfo *dir);

void fat32_read(void *buf, u32 size);
u8 fat32_readU8();
u16 fat32_readU16();
u32 fat32_readU32();
void fat32_skip(u32 count);


#endif //_FAT32_H_